import request from '@/utils/request'

//个人中心数据
export function getUserIndex() {
	return request.get({ url: '/user/index' }, { isAuth: true })
}
// 分享 首页数据
export function getShareIndex() {
	return request.get({ url: '/user/shareIndex' }, { isAuth: true })
}
// 个人信息
export function getUserInfo() {
	return request.get({ url: '/user/info' }, { isAuth: true })
}

// 个人编辑
export function userEdit(data : any) {
	return request.post({ url: '/user/setInfo', data }, { isAuth: true })
}

// 绑定手机
export function userBindMobile(data : any, header ?: any) {
	return request.post({ url: '/user/bindMobile', data, header }, { isAuth: true })
}

// 更改登录密码
export function userChangePwd(data : any) {
	return request.post({ url: '/user/changePassword', data }, { isAuth: true })
}

//忘记密码
export function forgotPassword(data : Record<string, any>) {
	return request.post({ url: '/user/resetPassword', data })
}

// 更改支付密码
export function userChangePayPwd(data : any) {
	return request.post({ url: '/user/changePayPassword', data }, { isAuth: true })
}

// 设置支付密码
export function setPayPwd(data : any) {
	return request.post({ url: '/user/setPayPwd', data }, { isAuth: true })
}

// 用户消息
export function getUserNotice() {
	return request.get({ url: '/user/notice' }, { isAuth: true })
}

//用户消息列表
export function getUserNoticeLists(data : any) {
	return request.get({ url: '/user/noticeLists', data }, { isAuth: true })
}

//用户消息详情
export function getUserNoticeDetail(data : { id : number }) {
	return request.get({ url: '/user/noticeDetail', data: data })
}

//奖励活动数据
export function getActivityIndex() {
	return request.get({ url: '/user/activityIndex' }, { isAuth: true })
}

//任务中心数据
export function getMissionIndex() {
	return request.get({ url: '/user/missionIndex' }, { isAuth: true })
}

//领取任务奖励
export function missionReward(data : any) {
	return request.post({ url: '/user/missionReward', data: data })
}

//意见反馈类型
export function getFeedbackCate() {
	return request.get({ url: '/user/feedbackCate' }, { isAuth: true })
}

//意见反馈
export function feedback(data : any) {
	return request.post({ url: '/user/feedback', data }, { isAuth: true })
}

//Google Authenticator校验
export function verifyGoogle(data : any) {
	return request.post({ url: '/user/verifyGoogle', data }, { isAuth: true })
}

//邮箱校验
export function verifyEmail(data : any) {
	return request.post({ url: '/user/verifyEmail', data }, { isAuth: true })
}

//实名认证
export function verifyRealname(data : any) {
	return request.post({ url: '/user/verifyRealname', data }, { isAuth: true })
}

//签到配置
export function signinConfig() {
	return request.get({ url: '/user/signinConfig' }, { isAuth: true })
}

//签到
export function signin(data : any) {
	return request.post({ url: '/user/signin', data }, { isAuth: true })
}

//挖矿 首页数据
export function getMineIndex() {
	return request.get({ url: '/user/mineIndex' }, { isAuth: true })
}

//挖矿记录
export function getMineLists(data : any) {
	return request.get({ url: '/user/mineLists', data }, { isAuth: true })
}

//矿机 启动
export function mineStart(data : any) {
	return request.post({ url: '/user/mineStart', data }, { isAuth: true })
}

//矿机 领取收益
export function mineReceive(data : any) {
	return request.post({ url: '/user/mineReceive', data }, { isAuth: true })
}